<div class="pageContent">
	
	<form method="post" action="/index.php?act=transportprice&st=transportprice_add&tmp_id={$tmp_id}" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
		<div class="pageFormContent" layoutH="58">

			
			<p>
				<label>省：</label>
				<select class="required combox" ref="city" refUrl="/index.php?act=area&st=get_city_list&v={value}">
					{foreach item=item from=$province}
					<option value="{$item.province}">{$item.province}</option>
					{/foreach}
				</select>
			</p>
			{if $tmp_info.tmp_type eq 1}
			<p>
				<label>市：</label>
				<select class="required combox" id="city" ref="area" refUrl="/index.php?act=area&st=get_area_list&v={value}">
					<option value="">请选择城市</option>
				</select>
			</p>
			<p>
				<label>区：</label>
				<select class="required combox" errormsg="请选择区县" id="area" ref="street" refUrl="/index.php?act=area&st=get_street_list&v={value}">
				<option value="">请选择区县</option>
				</select>
			</p>
			<p>
				<label>街道：</label>
				<select name="area_id" class="required combox" errormsg="请选择街道" id="street">
				<option value="">请选择街道</option>
				</select>
			</p>
			{elseif $tmp_info.tmp_type eq 2}
			<p>
				<label>市：</label>
				<select class="required combox" id="city" ref="area" refUrl="/index.php?act=area&st=get_area_station&v={value}">
					<option value="">请选择城市</option>
				</select>
			</p>
			<p>
				<label>地区站：</label>
				<select name="area_id" class="required combox" errormsg="请选择地区站" id="area">
				<option value="">请选择地区站</option>
				</select>
			</p>
			{elseif $tmp_info.tmp_type eq 3}
			<p>
				<label>市：</label>
				<select class="required combox" id="city" ref="area" refUrl="/index.php?act=area&st=get_port_list&v={value}">
					<option value="">请选择城市</option>
				</select>
			</p>
			<p>
				<label>港口：</label>
				<select class="required combox" errormsg="请选择港口" id="area" ref="street" refUrl="/index.php?act=area&st=get_port_dest&v={value}">
				<option value="">请选择港口</option>
				</select>
			</p>
			<p>
				<label>过驳目的港：</label>
				<select name="area_id" class="required combox" errormsg="请选择过驳目的港" id="street">
				<option value="">请选择过驳目的港</option>
				</select>
			</p>
			{elseif $tmp_info.tmp_type eq 4}
			<p>
				<label>市：</label>
				<select class="required combox" id="city" ref="area" refUrl="/index.php?act=area&st=get_area_wharf&v={value}">
					<option value="">请选择城市</option>
				</select>
			</p>
			<p>
				<label>地区码头：</label>
				<select name="area_id" class="required combox" errormsg="请选择地区码头" id="area">
				<option value="">请选择地区码头</option>
				</select>
			</p>
			{/if}
			<div class="divider"></div>
			<div class="unit">
				<label>区间最小值：</label>
				<input name="min_weight" type="text" size="30" value="" class="number required" errormsg="请输入区间最大值" readonly/>
			</div>
			<div class="unit">
				<label>区间最大值：</label>
				<input name="max_weight" type="text" size="30" value="" class="number required" errormsg="请输入区间最小值"/>
			</div>
			<div class="unit">
				<label>区间价格：</label>
				<input name="transport_price" type="text" size="30" value="" class="number required" errormsg="请输入区间价格"/>
			</div>
		</div>
		
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">提交</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>

	</form>

</div>

<script type="text/javascript">
$(function(){
	$("select[name=area_id]").change(function(){
		if($(this).val() != ""){
			$.ajax({
				url:"/index.php?act=transportprice&st=get_min_weight",
				type:"post",
				dataType:"json",
				data:{area_id:$(this).val(),tmp_id:'{$tmp_id}'},
				success:function(data){
					if(data.error == 0){
						$("input[name=min_weight]").val(data.val);
					}
				}
			});
		}
	});
});
</script>